<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="copyright" content="本页版权 www.zongheng.com 纵横中文网所有。All Rights Reserved"/>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="shortcut icon" href="https://static.zongheng.com/favicon.ico"/>
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>小说_小说推荐_好看的完本免费小说推荐</title>
    <meta name="keywords" content="书库，热门小说书库，连载小说书库，全本小说书库，书库更新列表，纵横中文网书库。"/>
    <meta name="description" content="纵横中文网小说书库，提供最新小说在线阅读，最新小说TXT下载，经典完本小说，包括奇幻小说，玄幻小说，言情小说，都市小说等各类小说尽在纵横中文网小说书库。"/>

    <link rel="stylesheet" type="text/css" th:href="@{/css/basic.min.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/css/store.min.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/css/index.min.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/layui/css/layui.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/css/common.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/css/ucenter.css}"/>

    <link th:href="@{/admin/css/bootstrap.min.css}" type="text/css" rel="stylesheet">
    <link th:href="@{/admin/css/materialdesignicons.min.css}" type="text/css" rel="stylesheet">
    <link th:href="@{/admin/css/style.min.css}" type="text/css" rel="stylesheet">


    <script type="text/javascript" th:src="@{/admin/js/bootstrap.min.js}"></script>
    <script type="text/javascript" th:src="@{/admin/js/perfect-scrollbar.min.js}"></script>
    <script type="text/javascript" th:src="@{/admin/js/main.min.js}"></script>
    <script type="text/javascript" th:src="@{/js/common.js}"></script>
    <script type="text/javascript" th:src="@{/layui/layui.js}"></script>
    <style>
        a {
            cursor: pointer;
        }

        body {
            background-color: #FCFCFC;
        }

        dl,
        dd {
            margin: 0;
        }

        #box {
            width: 100%;
            margin: 0px auto;
        }

        #box dl {
            height: 50px;
            line-height: 50px;
            border-bottom: 1px dashed #dadada;
            margin: 0 20px;
        }

        #box dt {
            float: left;
            color: #8a8a8a;
        }

        #box dd {
            float: left;
            color: #252525;
            margin: 0 10px;
            font-size: 14px;
            cursor: pointer;
        }

        #box dd.active {
            color: #c4284d;
            font-weight: bold;
        }

        #box dl.select {
            background: #efefef;
            margin: 0;
            padding: 0 20px;
        }

        #box dl.select dd {
            border: 1px solid #c4284d;
            height: 25px;
            line-height: 25px;
            margin-top: 13px;
            padding: 0 2px 0 10px;
            border-radius: 3px;
            background-color: #fff;
        }

        #box dl.select dd span {
            width: 20px;
            height: 20px;
            display: inline-block;
            text-align: center;
            line-height: 20px;
            background: #c4284d;
            color: #fff;
            margin-left: 10px;
            cursor: pointer;
            border-radius: 5px;
        }
    </style>
    <link rel="stylesheet" href="../../static/css/common.css">
</head>
<body>

<div class="wrap">

    <div class="head">
        <div class="head-top clearfix">
            <div class="logo imgbox fl">
                <a th:href="@{/index}"><img th:src="@{/picture/logo.png}" alt="logo" src=""></a>
            </div>
            <form id="commSearch" name="searchForm" method="get" th:action="@{/search}">
                <div class="search-box fl" data-hook="searchSuggest">
                    <label>
                        <input class="search-text fl" name="search" type="text"
                               placeholder="请输入书名"/>
                    </label>
                    <input type="submit" class="search-btn fr"/>
                </div>
            </form>
            <div class="right-wrap-login ud_userTox" style="right: 0">
                <div class="unlogin ud_unlogin clearfix">
                    <div th:if="${session.loginUser==null}" class="login fl"><a class="user_login layui-icon"
                                                                                th:href="@{/login}">&#xe66f;登录</a></div>
                    <div th:if="${session.loginUser==null}" class="regist fl"><a class="user_register layui-icon"
                                                                                 th:href="@{/signin}">&#xe672;注册</a>
                    </div>
                    <div th:if="${session.loginUser==null}" class="regist fl">
                        <a style="padding-left: 12px" class="layui-icon layui-icon-template-1 "
                           th:href="@{/author/index}">作家专区</a>
                    </div>
                    <div th:if="${session.loginUser!=null}" class="shelf">
                        <a class="user_login layui-icon" th:href="@{/personal}">&#xe66f;个人中心</a>
                        <a style="padding-left: 12px;" th:href="@{/shelf}" class="layui-icon"
                           target="_blank">&#xe705;书架</a>
                        <a style="padding-left: 12px" class="layui-icon layui-icon-template-1 "
                           th:href="@{/author/index}">作家专区</a>
                        <a style="padding-left: 12px;" class="layui-icon layui-icon-rmb" th:href="@{/recharge}">充值</a>
                        <a style="padding-left: 12px;" class="layui-icon" th:href="@{/logout}">&#x1006;注销</a>
                    </div>
                </div>
            </div>
        </div>
        <div style="display: none" class="nav clearfix">
            <a class="active" th:href="@{/index}">书库<em></em></a>
        </div>
    </div>


    <div class="h20-blank"></div>
    <!-- 书库主内容 -->
    <!-- 顶部复选区 -->
    <div class="h15-blank"></div>

    <!--个人中心核心内容-->
    <div class="main uc-content">
        <div class="uc-main-row clearfix">
            <div class="uc-left fl">
                <div class="uinfo">
                    <div class="usr-avatar">
                        <a title="更换头像">
                            <img class="trans-04s" th:src="${session.loginUser.imgSrc}">
                        </a>
                    </div>
                    <p class="usr-name">
                        <span th:text="${session.loginUser.userName}" title="小海豚_68569755">小海豚_68569755</span>
                    </p>
                    <p class="usr-reg-time">
                        <span th:text="${#dates.format(session.loginUser.createTime,'yyyy-MM-dd HH:mm')}">注册时间：2020-12-21 20:53</span>
                    </p>
                </div>

                <div class="spliter" style="height:6px;"></div>

                <div class="uc-side-nav hover3 " id="uc-side-nav">
                    <!--个人中心相关区域-->
                    <ul>
                        <li><a th:href="'/author/index'">数据图标</a></li>
                        <li><a th:href="'/author/novel/list'">我的书籍</a></li>
                        <li class="active"><a th:href="'/author/manage/comment'">评论管理</a></li>
                    </ul>
                </div>
                <div class="spliter" style="height:6px;"></div>
            </div>

            <div class="uc-right fr">


                <div class="card">
                    <div class="card-toolbar clearfix">
                        <div class="toolbar-btn-action">
                            <a onclick="deleteComment()" class="btn btn-danger"><i
                                    class="mdi mdi-window-close"></i> 删除</a>
                        </div>
                    </div>
                    <div class="card-body">

                        <div class="table-responsive">
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th>
                                        <label class="lyear-checkbox checkbox-primary">
                                            <input onclick="swapCheck()" type="checkbox"
                                                   id="check-all"><span></span>
                                        </label>
                                    </th>
                                    <th>评论者</th>
                                    <th>评论书籍</th>
                                    <th>评论章节</th>
                                    <th>评论内容</th>
                                    <th>评论时间</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr th:each="page : ${pageInfo.list}">
                                    <td>
                                        <label class="lyear-checkbox checkbox-primary">
                                            <input type="checkbox" name="ids[]"
                                                   th:value="${page.commentId}"><span></span>
                                        </label>
                                    </td>

                                    <td th:text="${page.userName}">1</td>
                                    <td th:text="${page.novelName}">第01章 天涯思君不可忘</td>
                                    <td th:text="${page.chapterName}">金庸</td>

                                    <td th:text="${page.commentContent}">金庸</td>
                                    <td th:text="${#dates.format(page.createdTime,'yyyy-MM-dd HH:mm')}">
                                        《倚天屠龙记》
                                    </td>

                                </tr>

                                </tbody>
                            </table>
                        </div>


                        <div class="modal-footer no-margin-top">
                            <ul class="pagination pull-right no-margin">

                                <li th:if="${pageInfo.hasPreviousPage}">
                                    <a th:href="'/author/manage/comment?pageNum=1'">首页</a>
                                </li>

                                <li class="prev" th:if="${pageInfo.hasPreviousPage}">
                                    <a th:href="'/author/manage/comment?pageNum='+${pageInfo.prePage}">
                                        <i class="ace-icon fa fa-angle-double-left">上一页</i>
                                    </a>
                                </li>
                                <!--遍历条数-->
                                <li th:each="nav:${pageInfo.navigatepageNums}">
                                    <a th:href="'/author/manage/comment?pageNum='+${nav}" th:text="${nav}"
                                       th:if="${nav != pageInfo.pageNum}"></a>
                                    <span style="font-weight: bold;background: #6faed9;"
                                          th:if="${nav == pageInfo.pageNum}" th:text="${nav}"></span>
                                </li>

                                <li class="next" th:if="${pageInfo.hasNextPage}">
                                    <a th:href="'/author/manage/comment?pageNum='+${pageInfo.nextPage}">
                                        <i class="ace-icon fa fa-angle-double-right">下一页</i>
                                    </a>
                                </li>

                                <li>
                                    <a th:href="'/author/manage/comment?pageNum='+${pageInfo.pages}">尾页</a>
                                </li>
                            </ul>

                        </div>

                    </div>

                </div>
            </div>

        </div>
    </div>


    <!-- end书库主内容 -->
</div>

<div class="footer">
    <div class="copyright">
        <div class="links"><a href="">关于纵横</a>|
            <a href="">诚聘英才</a>|
            <a href="">商务合作</a>|
            <a href="">法律声明</a>|
            <a href="">帮助中心</a>|
            <a href="">作者投稿</a>|
            <a href="">联系我们</a>|
            <a href="">友情链接</a>|
            <a href="">谨防诈骗</a>|
            <a href="">网站地图</a></div>
        <p>Copyright©<a href=""></a>All Rights Reserved 版权所有
            北京幻想纵横网络技术有限公司
            <a href="">京ICP证080527号</a>
            <a href="">京ICP备11009265号</a>
            <a href="">京网文[2018]10695-962号</a></p>
        <p>
            <a href="">新出发京零字第朝130010号</a> 丨
            统一社会信用代码91110105678221683F 丨
            <a href="">京公网安备
                11010502030124号</a> 丨
            <a href="">公安部网络违法犯罪举报网站</a>
        </p>
        <p><a href="">纵横小说网</a>,提供<a
                href="">玄幻小说</a>,<a href=""
        >都市小说</a>,<a
                href="">言情小说</a>等<a
                href="">免费小说</a>阅读。作者发布小说作品时，请遵守国家互联网信息管理办法规定。
        </p>
        <p>本站所收录小说作品、社区话题、书库评论均属其个人行为，不代表本站立场。</p>
    </div>
</div>


<script type="text/javascript" th:src="@{/admin/js/jquery.min.js}"></script>
<script type="text/javascript" th:src="@{/admin/js/bootstrap.min.js}"></script>
<script type="text/javascript" th:src="@{/admin/js/perfect-scrollbar.min.js}"></script>
<script type="text/javascript" th:src="@{/admin/js/main.min.js}"></script>
<script type="text/javascript" th:src="@{/js/common.js}"></script>

<script type="text/javascript">

    //checkbox 全选/取消全选
    var isCheckAll = false;

    function swapCheck() {
        if (isCheckAll) {
            $("input[type='checkbox']").each(function () {
                this.checked = false;
            });
            isCheckAll = false;
        } else {
            $("input[type='checkbox']").each(function () {
                this.checked = true;
            });
            isCheckAll = true;
        }
    };

    //删除按钮
    function deleteComment() {
        let id = getCheckId();
        if (id) {
            let flag = confirm("你确定要删除他/她的评论吗?");
            if (flag) {
                $.ajax({
                    url: "/author/comment/delete",
                    method: "post",
                    data: {'id': id},
                    dataType: "json",
                    success: function (result) {
                        if (result == true) {
                            alert("操作成功!");
                            location.reload();
                        } else if (result == false) {
                            alert("操作失败!");
                        } else {
                            alert(result.message);

                            if (result.message == '权限校验失败!') {
                                window.location.href = "/index";
                            }
                        }
                    }
                })
            }
        } else {
            alert("请勾选待处理的记录，且每次只能勾选一个");
        }
    }

</script>
</body>
</html>